#include "services.hxx"

/*
int service_demo(void* retv) {
	BEGIN;
	END;
}
*/

//TODO: 后台服务(service)

OUR_service services[] = {
	//名称，          方法，            参数个数，参数值，     返回类型
	{NULL,            NULL,            0,       NULL,        USERARG_INT_TYPE}
};

int OUR_register_services(int* decision, va_list args) {
	BEGIN;
	int size = sizeof(services) / sizeof(OUR_service) - 1, registered = 0;
	for (int i = 0; i < size; i++) {
		REGISTER_SERVICE(services[i].name, services[i].func,
			services[i].argc, services[i].argv, services[i].rett);
		if (ITK_ok == ifail)
			registered++;
	}
	info_syslog("*There are %d/%d services in '%s.%s' registered.\n\n",
		registered, size, EX_STRING(SITE), __FUNCTION__);
	END;
}
